//
//  UIBarButtonItem-Extension.swift
//  DHLive
//
//  Created by Mac on 2021/7/18.
//

import UIKit
extension UIBarButtonItem {
    
    //便利构造函数
    /*
    convenience init(iconName: String) {
        self.init()
        let btn = UIButton()
        btn.setImage(UIImage(named: iconName), for: .normal)
        btn.setImage(UIImage(named: iconName+"_highlighted"), for: .highlighted)
        btn.sizeToFit()
        self.customView = btn
    }*/
    
    convenience init(iconName: String) {
        let btn = UIButton()
        btn.setImage(UIImage(named: iconName), for: .normal)
        btn.setImage(UIImage(named: iconName+"_highlighted"), for: .highlighted)
        btn.sizeToFit()
        self.init(customView: btn)
        
    }
}
